package main

import (
	"fmt"
	"net/http"
)

var urls = []string{
	"http://www.baidu.com",
	"http://www.163.com",
	"http://www.taobao.com",
}
func main() {
	for _, url := range urls {
		resp, err := http.Head(url)
		if err != nil {
			fmt.Println("happen error.", err.Error())
			return
		}
		fmt.Printf("url=%s, status=%s\n", url, resp.Status)
	}
}
